﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Sponsors/SponsorMaster.Master"
    AutoEventWireup="true" CodeBehind="ChooseCountries.aspx.cs" Inherits="Nivdal.Sponsors.ChooseCountries" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Sponsors.css" rel="stylesheet" type="text/css" />
    <script src="Sponsors.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<asp:UpdatePanel ID="ChooseCountriesPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <asp:UpdateProgress runat="server" ID="Progress" AssociatedUpdatePanelID="ChooseCountriesPanel">
    <ProgressTemplate>
        <div class="ajaxloader">
            <asp:Image ID="ProgressImage" ImageUrl="~/Images/ajax-loader.gif" runat="server"/>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>
    <br />
    <br />
    <asp:Label ID="ChooseCountriesTitleLabel" runat="server" CssClass="bigTitleLabel"
        Text="<%$ Resources:SponsorsResource, NewSponsor_ChooseCountriesTitle %>"></asp:Label>
    <br />
    <br />
    <asp:Label ID="MessageLabel" runat="server" SkinID="ConfirmLabel"></asp:Label>
    <table style="width: 100%;">
        <tr>
            <td valign="top">
                 <asp:Repeater ID="SponsorToRegionsRepeater" runat="server" DataSourceID="RegionsSqlDataSource">
                    <ItemTemplate>
                      <asp:CheckBox ID="RegionCheckBox"  Text='<%# Eval("RegionName") %>'  ToolTip='<%# Eval("RegionId") %>' runat="server"  OnCheckedChanged="RegionCheckBox_OnCheckedChanged" AutoPostBack="true" />
                    </ItemTemplate>
                    <SeparatorTemplate>
                        <br>
                    </SeparatorTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="RegionsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="Nivdal_NewSponsorGetRegions" SelectCommandType="StoredProcedure">
                </asp:SqlDataSource>
            </td>
            <td>
                <asp:Repeater ID="SponsorToCountriesRepeater" runat="server" DataSourceID="GetSponsorToCountriesSqlDataSource">
                    <ItemTemplate>
                        <asp:CheckBox ID="CountriesCheckBox"  Text='<%# Eval("CountryName") %>' runat="server" ToolTip='<%# Eval("Region") %>' Checked='<%# Eval("IsEnabled") %>'  />
                         <asp:HiddenField ID="CountryIdHiddenField" runat="server"  Value='<%# Eval("CountryId") %>'/>
                    </ItemTemplate>
                    <SeparatorTemplate>
                        <br>
                    </SeparatorTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="GetSponsorToCountriesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="Nivdal_NewSponsorGetSponsorToCountries" SelectCommandType="StoredProcedure">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
                <asp:Button ID="SubmitButton" runat="server"  OnClick="SubmitButton_Clicked" Text="<%$ Resources:SponsorsResource, NewSponsor_Submit %>" />
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
     </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
